package com.gzk.hrm.feign;

import com.gzk.hrm.util.AjaxResult;
import com.gzk.hrm.doc.CourseDoc;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-search",fallbackFactory = CourseElasticSearchFeignFallbackFactory.class)
public interface CourseElasticSearchFeign {

    @RequestMapping(value = "/es/saveCourse",method = RequestMethod.POST)
    AjaxResult saveCourse(@RequestBody CourseDoc doc);

    @RequestMapping(value = "/es/deleteCourse",method = RequestMethod.POST)
    AjaxResult deleteCourse(@RequestBody Long id);
}
